home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
compuserve-file-archive
/
08 System Utilities
/
LRR200.SFX
/
lrr200.doc
< prev
Wrap
Text File
|
1990-02-12
|
25KB
|
448 lines
╠╔╘╘╠┼ ╥┼─ ╥┼┴─┼╥ ╓ERSION 2.00 [═ARCH 8, 1994]
═╙-─╧╙ FILE READER/WRITER FOR THE ├128 AND 1571/81/╞─ DRIVES.
BY ├RAIG ┬RUCE (CSBRUCE@NEUMANN.UWATERLOO.CA)
╘HIS PROGRAM HAS BEEN IMPROVED OVER VERSION 1.00 TO READ AND WRITE ╚IGH ─ENSITY
═╙-─╧╙ DISKS ON THE ├═─ ╞─-2000 AND ╞─-4000 DISK DRIVES. ╩UST SELECT DRIVE
TYPE "1581" FOR USING THESE DRIVES. ╙INCE THE NEW VERSION HAS GREATER MEMORY
REQUIREMENTS, AFTER STARTING UP "RAMDOS" (IF YOU USE IT) YOU WILL HAVE TO
EXECUTE THE "GRAPHIC CLR" ┬┴╙╔├ COMMAND.
1. ╔╬╘╥╧─╒├╘╔╧╬
╘HIS ARTICLE PRESENTS A PROGRAM THAT READS AND WRITES ═╙-─╧╙ FILES AND THE
ROOT DIRECTORY OF ═╙-─╧╙ DISKS. ╘HE PROGRAM COPIES ONLY FROM DRIVE TO DRIVE
WITHOUT BUFFERING FILE DATA INTERNALLY. ╘HIS IS SIMPLER AND IMPOSES NO LIMITS
ON THE SIZE OF THE FILES TRANSFERRED, ALTHOUGH IT REQUIRES THE USE OF TWO DISK
DRIVES (OR A LOGICAL DRIVE). ╘HE USER-INTERFACE CODE IS WRITTEN IN ┬┴╙╔├ AND
PRESENTS A FULL-SCREEN FILE SELECTION MENU. ╘HE GRUNT-WORK CODE IS WRITTEN IN
ASSEMBLY LANGUAGE AND OPERATES AT MAXIMUM VELOSITY.
╘HE PROGRAM ALSO ALLOWS ═╙-─╧╙ FILES TO BE DELETED AND TO ALLOWS THE COPYING OF
├OMMODORE-─╧╙ FILES BETWEEN ├┬═-─╧╙ DISKS (THIS MAKES IT MORE CONVENIENT TO
USE THE PROGRAM WITH A TEMPORARY LOGICAL DRIVE LIKE ╥┴═─╧╙). ┴LSO, SINCE ╔
HAVE A ├═─ ╞─-4000 FLOPPY DISK DRIVE, ╔ KNOW THAT THIS PROGRAM WORKS WITH
═╙-─╧╙ DISKS WITH THIS DRIVE (FOR BOTH THE 720╦ AND 1.44═ ═╙-─╧╙ FORMATS).
╘HE ╞─ DISK DRIVES ARE LOGICALLY REFERRED TO BELOW AS BEING THE 1581.
╘HE ┬URST ├OMMAND ╔NSTRUCTION ╙ET OF THE 1571/81 IS USED TO READ THE ═╙-─╧╙
DISK BLOCKS AND THE STANDARD KERNEL ROUTINES ARE USED FOR OUTPUTTING THE
DATA. (╔ AM AN OPERATING SYSTEMS SPECIALIST, SO ╔ CALL IT A KERN┼L!) ╘HUS,
THE ═╙-─╧╙ FILES MUST BE READ FROM A 1571 OR 1581 DISK DRIVE, BUT THE OUTPUT
DEVICE MAY BE ANY DISK DRIVE TYPE, THE SCREEN OR A PRINTER, OR A VIRTUAL DRIVE
TYPE SUCH AS ╥┴═╠INK, ╥┴═─RIVE, OR ╥┴═─╧╙ (FOR THE ╥┼╒). ╔T IS INTERESTING TO
NOTE THAT THE DATA CAN BE READ IN FROM AN ═╙-─╧╙ DISK FASTER THAN IT CAN BE
WRITTEN OUT TO A 1571, 1581, OR EVEN A ╥┴═─╧╙ FILE. ┴ ╥┴═╠INK CAN SWALLOW THE
DATA ONLY SLIGHTLY FASTER THAN IT CAN BE READ.
╠ITTLE ╥ED ╥EADER (╠╥╥) SUPPORTS DOUBLE DENSITY 3.5" DISKS FORMATTED WITH 80
TRACKS, 9 SECTORS PER TRACK, AND 2 SIDES WITH A 1581 AND 5.25" DOUBLE DENSITY
DISKS FORMATTED WITH 40 TRACKS, 9 SECTORS PER TRACK, AND 2 SIDES WITH A 1571,
AND NOW, HIGH DENSITY 3.5" DISKS FORMATTED WITH 80 TRACKS, 18 SECTORS PER
TRACK, 2 SIDES, AND A "12-BIT ╞┴╘". ┴ LIMIT OF 224 DIRECTORY ENTRIES AND 9
╞ILE ┴LLOCATION ╘ABLE (╞┴╘) SECTORS IS IMPOSED. ╘HERE MUST BE 2 COPIES OF THE
╞┴╘ AND THE CLUSTER SIZE MAY BE 1 OR 2 SECTORS. ╘HE SECTOR SIZE MUST BE 512
BYTES.
╘HE PROGRAM RUNS ON EITHER THE 40 OR 80-COLUMN SCREENS, BUT YOU WILL GET
MUCH BETTER PERFORMANCE FROM THE ┬┴╙╔├ PORTION OF THE PROGRAM BY BEING
IN 80-COLUMN MODE AND ╞┴╙╘ MODE. ┴ MODIFICATION THAT SOMEONE MIGHT WANT
TO MAKE WOULD BE TO SPREAD-OUT THE DISPLAY FOR THE 80-COLUMN SCREEN AND ADD
COLOR TO THE RATHER BLAND DISPLAY.
╧H, ABOUT THE NAME. ╔T IS A PLAY ON THE NAME OF ANOTHER ═╙-─╧╙ FILE COPIER
AVAILABLE FOR THE ├-128. "╠ITTLE" MEANS THAT IT IS SMALLER IN SCOPE THAN THE
OTHER PROGRAM, AND "╥ED" IS A DIFFERENT PRIMARY COLOR TO AVOID ANY LEGAL
COMPLICATIONS. ╔T IS ALSO THE NON-WHITE COLOR OF THE FLAG OF THE COUNTRY OF
ORIGIN OF THIS PROGRAM (NO, ╔ AM NOT ╩APANESE). ┴LSO, THIS PROGRAM IS ╨UBLIC
─OMAIN ╙OFTWARE, AS IS ALL SOFTWARE ╔ DEVELOP FOR 8-BIT ├OMMODORE ├OMPUTERS.
╞EEL FREE TO ┼-MAIL ME IF YOU HAVE QUESTIONS OR COMMENTS ABOUT THIS ARTICLE.
2. ╒╙┼╥ ╟╒╔─┼
╠╧┴─ AND ╥╒╬ THE "LRR.128" ┬┴╙╔├ PROGRAM FILE. ╫HEN THE PROGRAM IS FIRST RUN,
IT WILL DISPLAY AN "INITIALIZING" MESSAGE AND WILL LOAD IN THE BINARY MACHINE
LANGUAGE PACKAGE FROM THE "CURRENT" ├OMMODORE ─╧╙ DRIVE (THE CURRENT DRIVE IS
OBTAINED FROM ╨┼┼╦(186) - THE LAST DEVICE ACCESSED). ╘HE BINARY PACKAGE IS
LOADED ONLY ON THE FIRST RUN AND IS NOT RELOADED ON SUBSEQUENT RUNS IF THE
PACKAGE ╔─ FIELD IS IN PLACE.
╘HE SYSTEM IS DESIGNED TO HAVE TWO FILE SELECTION MENUS: ONE FOR THE ═╙-─╧╙
DISK DRIVE, AND ONE FOR THE ├OMMODORE-─╧╙ DISK DRIVE (WHICH MAY BE A LOGICAL
DISK DRIVE). ╘HE IDEA FOR COPYING IS THAT YOU SELECT THE FILES IN ONE OF
THESE MENUS, AND THEN PROGRAM KNOWS TO COPY THEM TO THE DISK FOR THE OTHER
MENU.
2.1. ═╙-─╧╙ ═┼╬╒
╘HE MAIN SCREEN OF THE PROGRAM IS THEN DISPLAYED. ╘HE MAIN SCREEN OF THE
PROGRAM WILL LOOK SOMETHING LIKE THIS:
═╙-─┼╓=9 ═╙-╘┘╨┼=1581 ├┬═-─┼╓=8
╬╒═ ╙ ╘╥╬ ╘┘╨ ╞╔╠┼╬┴═┼ ┼╪╘ ╠┼╬╟╘╚
--- - --- --- -------- --- ------
1 * ┴╙├ ╙┼╤ ╚┴├╦4 ╘╪╘ 120732
2 ┬╔╬ ╨╥╟ ╥┴═─╧╙ ╙╞╪ 34923
─=─╔╥┼├╘╧╥┘ ═=═╙-─┼╓ ╞=├┬═-─┼╓ ╤=╤╒╔╘
╘=╘╧╟╟╠┼-├╧╠╒═╬, ├=├╧╨┘-╞╔╠┼╙, +/- ╨┴╟┼
EXCEPT THAT IMMEDIATELY AFTER STARTING UP, "<DIRECTORY NOT LOADED>" WILL BE
DISPLAYED RATHER THAN FILENAMES. ╘HE "═╙-─┼╓" AND "═╙-╘┘╨┼" FIELDS GIVE THE
DEVICE NUMBER AND TYPE OF THE DRIVE CONTAINING THE ═╙-─╧╙ DISK TO COPY FROM,
AND THE "├┬═-─┼╓" GIVES THE DEVICE NUMBER OF THE DRIVE/VIRTUAL DRIVE/CHARACTER
DEVICE TO COPY FILE DATA TO. ╘HE NUMBER OF BYTES FREE ON THE DRIVE ARE ALSO
DISPLAYED (WHICH IS USEFUL TO KNOW WHEN WRITING FILES) AND THERE ARE SOME MORE
COMMANDS.
╔NFORMATION ABOUT ALL ═╙-─╧╙ FILES IN THE ROOT DIRECTORY OF THE ═╙-─╧╙ DISK IS
DISPLAYED IN COLUMNS BELOW THE DRIVE INFORMATION. "╬╒═" GIVES THE NUMBER OF
THE ═╙-─╧╙ FILE IN THE DIRECTORY LISTING, AND "╙" INDICATES WHETHER THE FILE
IS "SELECTED" OR NOT. ╔F THE FILE IS SELECTED, AN ASTERISK (*) IS DISPLAYED;
OTHERWISE, A BLANK IS DISPLAYED. ╫HEN YOU LATER ENTER ├OPY ═ODE, ONLY THE
FILES THAT HAVE BEEN "SELECTED" ARE COPIED.
╘HE "╘╥╬" FIELD INDICATES THE CHARACTER TRANSLATION SCHEME TO BE USED WHEN THE
FILE IS COPIED. ┴ VALUE OF "┬╔╬" (BINARY) MEANS NO TRANSLATION AND A VALUE OF
"┴╙├" (ASCII) MEANS THE FILE CHARACTERS ARE TO BE TRANSLATED FROM ═╙-─╧╙ ┴╙├╔╔
(OR "┴╙├╔╔-├R╠F") TO ╨┼╘╙├╔╔. ╘HE "╘┘╨" FIELD INDICATES THE TYPE OF
├OMMODORE-─╧╙ FILE TO CREATE FOR WRITING THE ═╙-─╧╙ FILE CONTENTS INTO. ╘HE
POSSIBLE VALUES ARE "╙┼╤" (SEQUENTIAL) AND "╨╥╟" (PROGRAM). ╘HE VALUES OF THE
╘╥╬ AND ╘┘╨ FILEDS ARE SET INDEPENDENTLY, SO YOU CAN COPY BINARY DATA TO ╙┼╤
FILES AND ASCII DATA TO ╨╥╟ FILES IF YOU WISH.
╘HE "╞╔╠┼╬┴═┼" AND "┼╪╘" FIELDS GIVE THE FILENAME AND EXTENSION TYPE OF THE
═╙-─╧╙ FILES AND "╠┼╬╟╘╚" GIVES THE EXACT LENGTH OF THE FILES IN BYTES. ╬OTE
THAT IF YOU PERFORM "┴╙├" TRANSLATION ON A FILE, ITS ╨┼╘╙├╔╔ VERSION WILL HAVE
A SHORTER LENGTH.
2.2. ╒╙┼╥ ├╧══┴╬─╙
╘HE BOTTOM OF THE SCREEN GIVES THE COMMAND SUMMARY. ┴FTER STARTING THE
PROGRAM, YOU WILL WANT TO SETUP THE ═╙-─╧╙ AND ├┬═-─╧╙ DRIVES WITH THE "═" AND
"╞" COMMANDS. ╙IMPLY PRESS THE (LETTER) KEY CORRESPONDING TO THE COMMAND
NAME TO ACTIVATE THE COMMAND. ╨RESSING ═ WILL PROMPT YOU FOR THE ═╙-─╧╙ ─RIVE
╬UMBER AND THE ═╙-─╧╙ ─RIVE ╘YPE. ╔N BOTH CASES, TYPE THE NUMBER AND PRESS
╥┼╘╒╥╬. (╙ORRY FOR INSULTING ALL NON-NOVICES OUT THERE, BUT ╔ WANT TO BE
COMPLETE). ╘HE ═╙-─╧╙ DRIVE NUMBER CANNOT BE THE SAME AS THE ├┬═-─╧╙ DRIVE
NUMBER (SINCE THE PROGRAM COPIES FROM DRIVE-TO-DRIVE WITHOUT INTERNAL
BUFFERING). ╞OR THE DRIVE TYPE, ENTER AN "8", "81", OR "1581" FOR A 1581
DRIVE OR ANYTHING ELSE FOR A 1571 DRIVE.
╨RESSING ╞ WILL PROMPT YOU FOR THE ├┬═-─╧╙ DEVICE NUMBER. ┘OU MAY ENTER A
NUMBER FROM 0 TO 30, EXCEPT THAT IT MUST NOT BE THE ═╙-─╧╙ DRIVE NUMBER.
┼NTER A "1" FOR ├ASSETTE ─RIVE (╟OD FORBID!), A "3" FOR THE SCREEN, A "4" FOR
THE PRINTER (WITH AN AUTOMATIC SECONDARY ADDRESS OF 7 (LOWERCASE)), ANY NUMBER
ABOVE 7 FOR A ├OMMODORE DISK DRIVE OR SPECIAL VIRTUAL DRIVE, OR A VALUE OF "0"
FOR THE SPECIAL "NULL" DRIVE. ┴ ├┬═-─┼╓ VALUE OF 0 WILL CASE THE PROGRAM TO
READ ═╙-─╧╙ FILES AND DO NOTHING WITH THE OUTPUT. ┘OU CAN USE THIS FEATURE TO
CHECK OUT THE RAW READING SPEED OF THE PROGRAM.
┴FTER SETTING UP THE DRIVES, PRESS ─ TO READ IN THE ROOT DIRECTORY OFF THE
═╙-─╧╙ DISK. ╘HE DATA WILL COME BLAZING IN FROM THE DISK BUT ┬┴╙╔├ WILL TAKE
ITS GOOD OLE TIME SIFTING THROUGH IT. ╞ILENAMES ARE DISPLAYED ON THE SCREEN
AS THEY ARE SCANNED IN. ╘HE PROGRAM WILL (EVENTUALLY) RETURN TO THE MAIN
SCREEN AND DISPLAY THE FORMATTED FILE INFORMATION. ╧NE NOTE: THE PROCESS OF
LOGGING IN A 1581 ═╙-─╧╙ DISK TAKES ABOUT 12 SECONDS (ON MY 1581, ANYWAY), SO
BE PATIENT. ┴N ═╙-─╧╙ DISK WILL HAVE TO BE "LOGGED IN" EVERY TIME YOU CHANGE
═╙-─╧╙ DISKS. (─ISKS ARE LOGGED IN AUTOMATICALLY).
┴ COUPLE OF NOTES ABOUT ACCESSING ═╙-─╧╙ DISKS: DON'T TRY TO ACCESS A DEVICE
THAT IS NOT PRESENT BECAUSE THE MACHINE LANGUAGE ROUTINES CANNOT HANDLE THIS
ERROR FOR SOME REASON AND WILL LOCK UP, REQUIRING A ╙╘╧╨+╥┼╙╘╧╥┼. ┴LSO, MAKE
SURE THAT AN ACTUAL ═╙-─╧╙ DISK IS LOADED INTO THE DRIVE. ╔F YOU ACCIDENTALLY
PLACE ├OMMODORE-─╧╙ DISK INTO THE ═╙-─╧╙ DRIVE, THE 1581 WILL REPORT AN
INVALID BOOT PARAMETERS ERROR (#60), BUT A 1571 WILL LOCK UP (SINCE ╔ DON'T
CHECK THE SECTOR SIZE AND MY BURST ROUTINES ARE EXPECTING 512 BYTES TO COME
OUT OF A SECTOR WHEREAS ├OMMODORE DISKS HAVE ONLY 256 BYTES PER SECTOR).
╬OW YOU ARE READY TO PICK WHAT FILES YOU WANT COPIED AND HOW YOU WANT THEM
COPIED. ┘OU WILL NOTICE THAT A "CURSOR" APPEARS IN THE "╙" COLUMN OF THE
FIRST FILE. ┘OU MAY MOVE THE CURSOR AROUND WITH THE CURSOR KEYS: ╒╨, ─╧╫╬,
╠┼╞╘, ╥╔╟╚╘, ╚╧═┼, AND ├╠╥. ├╠╥ (╙╚╔╞╘-╚╧═┼) WILL MOVE THE CURSOR BACK TO THE
FIRST FILE ON THE FIRST SCREEN. ┘OU CAN MOVE THE CURSOR AMONG THE SELECT,
TRANSLATION, AND FILE-TYPE COLUMNS OF ALL THE FILES. ╨RESSING A ╙╨┴├┼ OR A
╥┼╘╒╥╬ WILL TOGGLE THE VALUE OF THE FIELD THAT THE CURSOR IS ON. ╘O TOGGLE
ALL OF THE VALUES OF THE "CURSOR" COLUMN (INCLUDING FILES ON ALL OTHER
SCREENS), PRESS ╘. ┘OU WILL NOTICE THAT MOVING THE CURSOR AROUND AND TOGGLING
FIELDS IS A BIT SLUGGISH, ESPECIALLY IF YOU ARE IN ╙LOW MODE ON THE 40-COLUMN
SCREEN. ─ID ╔ MENTION THAT THIS PROGRAM WILL RUN ON EITHER THE 40 OR
80-COLUMN SCREEN? ╘OGGLING AN ENTIRE COLUMN CAN TAKE A COUPLE OF SECONDS.
╔F THERE ARE MORE THAN 18 ═╙-─╧╙ FILES, YOU CAN PRESS THE "+" AND "-" KEYS TO
MOVE AMONG ALL OF THE SCREENS OF FILES. ╘HE CURSOR MOVEMENT KEYS WILL WRAP
AROUND ON THE CURRENT SCREEN. "+" IS PAGE FORWARD, AND "-" IS PAGE BACKWARD.
╘HE SCREENS WRAP AROUND TOO.
┴FTER YOU HAVE SELECTED ALL OF THE FILES YOU WANT TO COPY AND THEIR TRANSLATION
AND FILE-TYPE FIELDS HAVE BEEN SET, PRESS THE ├ KEY TO GO INTO ├OPY ═ODE (NEXT
SECTION). ┴FTER COPYING, YOU ARE RETURNED TO THE MAIN SCREEN WITH ALL OF THE
FIELD SETTINGS STILL INTACT. ╘O EXIT FROM THE PROGRAM, PRESS ╤.
┴DDITIONAL COMMANDS ARE: "╥" (REMOVE == DELETE), "/" (CHANGE MENU), AND "╪"
(COPY ├┬═ FILES == "╪EROX").
╘HE REMOVE COMMAND IS USED TO DELETE SELECTED FILES FROM THE ═╙-─╧╙ DISK.
┴FTER SELECTING THIS OPTION, YOU WILL GET AN ANNOYING "ARE YOU SURE" QUESTION
AND THE THE SELECTED FILES WILL QUICKLY DISAPPEAR AND THE CHANGES WILL FINALLY
BE WRITTEN TO DISK. ─ELETING A BATCH OF ═╙-─╧╙ FILES IS MUCH QUICKER THAN
DELETING ├OMMODORE-─╧╙ FILES SINCE ═╙-─╧╙ DISKS USE A ╞ILE ┴LLOCATION ╘ABLE
RATHER THAN THE LINKED LIST OF BLOCKS ORGANIZATION THAT ├┬═ USES. ╔N ORDER TO
MAKE THE ┬┴╙╔├ PROGRAM EXECUTE QUICKER, AFTER DELETING, THE ORIGINAL ORDER OF
THE FILENAMES IN THE DIRECTORY LISTING WILL BE CHANGED. ┬E FOREWARNED THAT
THE DELETE OPERATION IS NON-RECOVERABLE.
╘HE CHANGE MENU COMMAND IS USED TO MOVE BACK AND FORTH BETWEEN THE ├OMMODORE-
─╧╙ AND ═╙-─╧╙ MENUS.
2.3. ├╧╨┘╔╬╟ ═╙-─╧╙ ╘╧ ├┬═-─╧╙
╫HEN YOU ENTER COPY MODE, THE SCREEN WILL CLEAR AND THE NAME OF EACH SELECTED
FILE IS DISPLAYED AS IT IS BEING COPIED. ╔F AN ERROR IS ENCOUNTERED ON EITHER
THE ═╙-─╧╙ OR ├┬═-─╧╙ DRIVE DURING COPYING, AN ERROR MESSAGE WILL BE DISPLAYED
AND COPYING WILL CONTINUE (AFTER YOU PRESS A KEY FOR ═╙-─╧╙ ERRORS).
╘O GENERATE A ├┬═-─╧╙ FILENAME FROM AN ═╙-─╧╙ FILENAME, THE EIGHT FILENAME
CHARACTERS ARE TAKEN (INCLUDING SPACES) AND A DOT (.) AND THE THREE CHARACTERS
OF THE EXTENSION ARE APPENDED. ╘HEN, ALL SPACES ARE REMOVED, AND IF THE NAME
ENDS WITH A DOT (.) CHARACTER, THEN THAT DOT CHARACTER IS REMOVED AS WELL. ╔
THINK THIS IS FAIRLY REASONABLE.
╔F THERE ALREADY IS A FILE WITH THE SAME FILENAME ON THE ├┬═-─╧╙ DISK, THEN
YOU WILL BE PROMPTED IF YOU WANT TO OVERWRITE THE FILE OR NOT. ┼NTERING AN
"N" WILL ABORT THE COPYING OF THAT FILE AND GO ON TO THE NEXT FILE, AND
ENTERING A "Y" (OR ANYTHING ELSE) WILL CAUSE THE ├┬═-─╧╙ FILE TO BE
"SCRATCHED" AND THEN RE-WRITTEN.
╘HE PHYSICAL COPYING OF THE FILE IS DONE COMPLETELY IN MACHINE LANGUAGE AND
NOTHING IS DISPLAYED ON THE SCREEN WHILE THIS IS HAPPENING, BUT YOU CAN FOLLOW
THINGS BY LOOKING AT DAS BLINKIN LICHTES AND LISTENING FOR CLICKS AND GRINDS.
┘OU WILL PROBABLY BE SURPRISED BY THE ═╙-─╧╙ FILE READING SPEED (╔ MEAN IN A
GOOD WAY). ╘HE DISK DATA IS READ IN WHOLE TRACKS AND CACHED IN MEMORY AND THE
DIRECTORY INFORMATION AND THE ╞┴╘ ARE RETAINED IN MEMORY AS WELL. ╘HE RESULT
IS THAT MINIMAL TIME IS SPENT READING DISK DATA, AND NO COSTLY SEEKS ARE
REQUIRED FOR OPENING A NEW ═╙-─╧╙ FILE. ┴ RESULT IS THAT SMALL FILES ARE
COPIED ONE AFTER ANOTHER VERY QUICKLY. ┘OU WILL HAVE TO WAIT, HOWEVER, ON THE
RELATIVELY SLOW STANDARD KERNEL/├OMMODORE-─╧╙ FILE WRITING.
┴ FEW CHANGES HAD TO BE MADE TO THE PROGRAM TO ACCOMODATE THE ╥┴═─╧╙ PROGRAM.
╥┴═─╧╙ USES MEMORY FROM $2300 TO $3╞╞╞ OF ╥┴═0, WHICH IS NOT REALLY A GOOD
PLACE FOR A DEVICE DRIVER, AND IT USES SOME OF THE ZERO-PAGE LOCATIONS THAT ╔
WANTED TO USE. ┬UT, DIFFICULTIES WERE OVERCOME. ╘HE IMPORTANCE OF ╥┴═─╧╙
COMPATIBILITY IS THAT IF YOU ONLY HAVE ONE DISK DRIVE BUT YOU HAVE AN ╥┼╒, YOU
CAN USE ╥┴═─╧╙ TO STORE THE ═╙-─╧╙ FILES TEMPORARILY. ╔F YOU ONLY HAVE ONE
DISK DRIVE AND NO ╥┼╒, YOU ARE ╙╧╠ (╧UT OF ╠UCK) UNLESS YOU CAN GET A
╥AM─ISK-TYPE PROGRAM FOR AN UNEXPANDED 128. ╘HE ╥┴═─╧╙ PROGRAM IS AVAILABLE
FROM ╞╘╨ SITE "CCOSUN.CALTECH.EDU" IN FILE "/PUB/RKNOP/UTIL128/RAMDOSII.SFX".
╧NE NOTE ╔ FOUND OUT ABOUT ╥┴═─╧╙: YOU CANNOT USE A
─╧╨┼╬#1,(├╞$),╒(├─),╫
WITH IT LIKE YOU ARE SUPPOSED TO BE ABLE TO; YOU HAVE TO USE A
─╧╨┼╬#1,(├╞$+",╫"),╒(├─)
╚ERE IS A TABLE OF COPYING SPEEDS FOR COPYING FROM 1571S AND 1581S WITH ┴╙├
AND ┬╔╬ TRANSLATION MODES. ┴LL FIGURES ARE IN BYTES/SECOND. ╘HESE RESULTS
WERE OBTAINED FROM COPYING A 127,280 BYTE TEXT FILE (THE TEXT OF ├= ╚ACKING
╔SSUE #3).
╞╥╧═ \ ╘╧: "NULL" ╥┴═╠INK ╥┴═─╧╙ ╩─1581 ╩─1571
-------+ ------ ------- ------ ------ ------
81-BIN ▄ 5772 3441 2146 N/A 644
81-ASC ▄ 5772 3434 2164 N/A 661
71-BIN ▄ 4323 2991 1949 1821 N/A
71-ASC ▄ 4323 2982 1962 1847 N/A
╘HE "NULL" DEVICE IS THAT "0" ├┬═-─╧╙ DEVICE NUMBER, AND A COUPLE OF ENTRIES
ARE "N/A" SINCE ╔ ONLY HAVE ONE 1571 AND ONE 1581. ╬OTE THAT MY 71 AND 81 ARE
╩IFFY─╧╙-IFIED, SO THE PERFORMANCE OF A STOCK 71/81 WILL BE POORER. ╩IFFY─╧╙
GIVES ABOUT A 2X PERFORMANCE IMPROVEMENT FOR THE STANDARD FILE ACCESSING CALLS
(OPEN, CLOSE, CHRIN, CHROUT). ╥┴═─╧╙ DOESN'T SEEM TO BE AS SNAPPY AS YOU
MIGHT THINK.
╘HE "NULL" FIGURES ARE QUITE IMPRESSIVE, BUT THE RAW SECTOR READING SPEED
WITHOUT THE OVERHEAD OF MUCKING AROUND WITH FILE ORGANIZATION IS 6700
BYTES/SEC FOR A 1581 AND 4600 ┬/S FOR A 71. ╘HE REASON THAT THE 1571 OPERATES
SO QUICKLY IS THAT ╔ USE A SECTOR INTERLEAVE OF 4 (WHICH IS OPTIMAL) FOR
READING THE TRACKS. ╔ THINK THAT OTHER ═╙-─╧╙ FILE COPIER PROGRAM USES AN
INTERLEAVE OF 1 (WHICH IS NOT OPTIMAL). ╔ LOSE SOME OF THE RAW PERFORMANCE
BECAUSE ╔ COPY THE FILE DATA INTERNALLY ONCE BEFORE OUTPUTTING IT (TO SIMPLIFY
SOME OF THE CODE).
╔N A COUPLE OF PLACES YOU WILL NOTICE THAT ┴╙├ TRANSLATION GIVES SLIGHTLY
BETTER OR SLIGHTLY WORSE PERFORMANCE THAN ┬╔╬. ╘HIS IS BECAUSE ALTHOUGH
SLIGHTLY MORE WORK IS REQUIRED TO TRANSLATE THE CHARACTERS, SLIGHTLY FEWER
CHARACTERS WILL HAVE TO BE WRITTEN TO THE ├┬═-─╧╙ FILE, SINCE ╨┼╘╙├╔╔ USES
ONLY ├╥ WHERE ═╙-─╧╙ ┴╙├╔╔ USES ├╥ AND ╠╞ TO REPRESENT END-OF-LINE.
╘RANSLATION IS DONE BY USING A TABLE (THAT YOU CAN CHANGE IF YOU WISH). ═ANY
ENTRIES IN THIS TABLE CONTAIN A VALUE OF ZERO, WHICH MEANS THAT NO CHARACTER
WILL BE OUTPUT ON TRANSLATION. ═OST OF THE CONTROL CHARACTERS AND ALL OF THE
CHARACTERS OF VALUE 128 (0X80) OR GREATER ARE THROWN AWAY ON BEING
TRANSLATED. ╘HE TABLE IS SET UP SO THAT ├╥ CHARACTERS ARE THROWN AWAY AND THE
╠╞ CHARACTER IS TRANSLATED TO A ├┬═-─╧╙ ├╥ CHARACTER. ╘HUS, BOTH ═╙-─╧╙ ┴╙├╔╔
FILES AND ╒╬╔╪ ┴╙├╔╔ FILES CAN BE TRANSLATED CORRECTLY.
2.4. ├╧══╧─╧╥┼-─╧╙ ═┼╬╒
╘HE ├OMMODORE-─╧╙ MENU, WHICH DISPLAYS THE NAMES OF THE ├OMMODORE FILES
SELECTED FOR VARIOUS OPERATIONS, LOOKS AND WORKS PRETTY MUCH THE SAME AS
THE ═╙-─╧╙ MENU:
├┬═─╧╙ ═╙=10:1581 ├┬═=8 ╞╥┼┼=3211476
╬╒═ ╙ ╘╥╬ ╞╔╠┼╬┴═┼ ╘ ╠┼╬╟╘╚
--- - --- ---------------- - ------
1 * ┬╔╬ ╠╥╥-128 ╨ 9876
2 ┴╙├ ├╧═-╚┴├╦╔╬╟-005 ╙ 175412
─=─╔╥ ═=═╙─┼╓ ╞=├┬═─┼╓ ├=├╧╨┘ ╤=╤╒╔╘
╘=╘╧╟╟╠┼ ╥=╥┼═╧╓┼ ╪=├┬═├╨┘ /=═┼╬╒ +-=╨╟
┘OU'LL NOTICE, HOWEVER, THAT THE FILETYPE FIELD ("╘" HERE) IS MOVED AND IS
UNCHANGABLE. ┴LSO, THE FILE LENGTHS ARE NOT EXACT; THEY ARE REPORTED AS THE
BLOCK COUNT OF THE FILE MULTIPLIED BY 254. ╘HIS MENU IS NOT MAINTAINED FOR
FILES BEING COPIED TO THE ├┬═-─╧╙ DISK FROM AN ═╙-─╧╙ DISK. ┘OU'LL
HAVE TO RE-EXECUTE THE ─IRECTORY INSTRUCTION TO GET AN UPDATED LISTING.
╘HE "─" (DIRECTORY) COMMAND HAS LOCAL EFFECT WHEN IN THIS MENU. ╘HE
├OMMODORE-─╧╙ DIRECTORY WILL BE LOADED FROM THE CURRENT ├┬═ DEVICE NUMBER.
╬OTE THAT IN ORDER FOR THIS TO WORK, THE ├┬═ DEVICE MUST BE NUMBER EIGHT
OR GREATER (A DISK DRIVE). ╧RIGINALLY, THE SUBROUTINE FOR THIS COMMAND WAS
WRITTEN USING ONLY ╟┼╘#'S FROM THE DISK AND WAS VERY SLOW. ╔T WAS MODIFIED,
HOWEVER, TO CALL A MACHINE LANGUAGE SUBROUTINE TO READ THE INFORMATION FOR
A DIRECTORY ENTRY FROM THE DIRECTORY LISTING, AND HENCE THE SUBROUTINE NOW
OPERATES AT A TOLERABLE SPEED.
╘HE "├" (COPY) COMMAND ALSO HAS A DIFFERENT MEANING WHEN IN THIS MENU. ╔T
MEANS TO COPY THE SELECTED ├┬═ FILES TO THE ═╙-─╧╙ DISK. ╙EE DETAILS BELOW.
╘HE COPY ├┬═ FILES ("╪") COMMAND IS USED TO COPY THE FILES IN THE ├┬═-─╧╙ MENU
TO ANOTHER ├┬═-─╧╙ DISK UNIT. ╙ELECT THE FILES YOU WANT TO COPY AND THEN
PRESS ╪. ┘OU WILL THEN BE ASKED WHAT DEVICE NUMBER YOU WANT TO COPY THE FILES
TO. ╘HE DEVICE CAN BE ANOTHER DISK DRIVE OR ANY OTHER DEVICE (EXCEPT THE
KEYBOARD). ╒SING DEVICE NUMBER 0 DOES NOT MEAN THE "NULL" DEVICE AS IT DOES
WITH COPYING ═╙-─╧╙ TO ├┬═. ╔F YOU ARE COPYING TO A DISK DEVICE AND THE FILE
ALREADY EXISTS, THEN YOU WILL BE ASKED IF YOU WISH TO OVERWRITE THE FILE. ┘OU
CANNOT COPY TO THE SAME DISK UNIT. ┴LSO, ALL FILES ARE COPIED IN BINARY MODE
(REGARDLESS OF WHAT TRANSLATION YOU HAVE SELECTED FOR A FILE).
╘HE COPY ├┬═ FILES COMMAND WAS INCLUDED SINCE ALL OF THE LOW-LEVEL GEAR
NEEDED TO IMPLEMENT IT (SPECIFICALLY "COMMIE╔N" AND "COMMIE╧UT" BELOW) WAS
ALSO REQUIRED BY OTHER FUNCTIONS. ╘HIS COMMAND CAN BE VERY CONVENIENT WHEN
WORKING WITH ╥┴═─╧╙. ╞OR EXAMPLE, IF YOU ONLY HAD A 1571 AS DEVICE 8 BUT YOU
HAVE A ╥┴═ EXPANDER AND HAVE INSTALLED ╥┴═─╧╙ AS DEVICE 9, THEN YOU WOULD
COPY ═╙-─╧╙ FILES TO ╥┴═─╧╙ USING THE ═╙-─╧╙ MENU, AND THEN YOU WOULD GO TO
THE ├OMMODORE-─╧╙ MENU ("/"), READ THE DIRECTORY, SELECT ALL FILES, INSERT AN
├OMMODORE-─╧╙ DISKETTE INTO YOUR 1571, AND THEN USE "╪" TO COPY FROM THE
╥┴═─╧╙ DEVICE TO THE 1571.
╘HE REMOVE COMMAND ("╥") DOES NOT WORK FOR THIS DIRECTORY. ┘OU CAN ╙├╥┴╘├╚
YOUR ├┬═-─╧╙ FILES YOUR DAMN SELF.
2.5. ├╧╨┘ ├┬═-─╧╙ ╘╧ ═╙-─╧╙
┬EFORE YOU CAN COPY SELECTED ├┬═-─╧╙ FILES TO AN ═╙-─╧╙ DISK, THE ═╙-─╧╙ DISK
DIRECTORY MUST BE ALREADY LOADED (FROM THE ═╙-─╧╙ MENU). ╘HIS IS REQUIRED
SINCE THE DIRECTORY AND ╞┴╘ INFORMATION ARE KEPT IN MEMORY AT ALL TIMES DURING
THE EXECUTION OF THIS PROGRAM.
╫HEN YOU ENTER COPY MODE, THE SCREEN WILL CLEAR AND THE NAME OF EACH SELECTED
FILE IS DISPLAYED AS IT IS BEING COPIED. ╔F AN ERROR IS ENCOUNTERED ON EITHER
THE ═╙-─╧╙ OR ├┬═-─╧╙ DRIVE DURING COPYING, AN ERROR MESSAGE WILL BE DISPLAYED
AND COPYING WILL CONTINUE (AFTER YOU PRESS A KEY FOR ═╙-─╧╙ ERRORS). ╨LEASE
NOTE THAT NOT A WHOLE LOT OF EFFORT WAS PUT INTO ERROR RECOVERY.
╘O GENERATE AN ═╙-─╧╙ FILENAME FROM AN ├┬═-─╧╙ FILENAME, THE FOLLOWING
ALGORITHM IS USED. ╘HE FILENAME IS SEARCHED FROM RIGHT TO LEFT FOR THE LAST
"." CHARACTER. ╔F THERE IS NO "." CHARACTER, THEN THE ENTIRE FILENAME, UP TO
11 CHARACTERS, IS USED AS THE ═╙-─╧╙ FILENAME. ├HARACTERS 9 TO 11 WILL BE
USED AS THE EXTENSION. ╔F THERE IS A "." CHARACTER, THE ALL CHARACTERS BEFORE
IT, UP TO EIGHT, WILL BE USED AS THE ═╙-─╧╙ FILENAME AND ALL CHARACTERS AFTER
THE FINAL ".", UP TO THREE, WILL BE USED AS THE ═╙-─╧╙ EXTENSION.
╘HEN, THE NEWLY GENERATED ═╙-─╧╙ FILENAME IS SCANNED FOR ANY EXTRA "."
CHARACTERS OR EMBEDDED SPACES. ╔F ANY ARE FOUND, THEY ARE REPLACED BY THE
UNDERSCORE CHARACTER ("_", WHICH IS THE BACKARROW CHARACTER ON A ├OMMODORE
DISPLAY). ╞INALLY, ALL TRAILING UNDERSCORES ARE REMOVED FROM THE END OF BOTH
THE FILENAME AND EXTENSION PORTIONS OF THE ═╙-─╧╙ FILENAME. ┴LSO, ALL
CHARACTERS ARE CONVERTED TO LOWERCASE ╨┼╘╙├╔╔ (WHICH IS UPPERCASE ┴╙├╔╔) WHEN
THEY ARE COPIED INTO THE ═╙-─╧╙ FILENAME. ╬OTE THAT IF THE ├OMMODORE FILENAME
IS NOT IN THE 8/3 FORMAT OF ═╙-─╧╙, THEN SOMETHING IN THE NAME MAY BE LOST.
╙OME EXAMPLES OF FILENAME CONVERSION FOLLOW:
├┬═-─╧╙ ╞╔╠┼╬┴═┼ ═╙-─╧╙ ╞╔╠┼╬┴═┼
---------------- ---------------
"LRR.BIN" "LRR.BIN"
"LRR.128.BIN" "LRR_128.BIN"
"HELLO THERE.TEXT" "HELLO_TH.TEX"
"LONG_FILENAME" "LONG_FIL.ENA"
"FILE 1..3.S__5" "FILE_1.S"
╔T WOULD HAVE BEEN TIME-CONSUMING TO HAVE THE PROGRAM SCAN THE ═╙-─╧╙
DIRECTORY FOR A FILENAME ALREADY EXISTING ON THE DISK, SO ╠╥╥ WILL PUT
MULTIPLE FILES ON A DISK WITH THE SAME FILENAME WITHOUT COMPLAINING. ╘HIS
ALSO GETS RID OF THE PROBLEM OF ASKING YOU IF YOU WANT TO OVERWRITE THE OLD
FILE OR GENERATE A NEW NAME. ╚OWEVER, IN ORDER TO RETRIEVE THE FILE FROM
DISK ON AN ═╙-─╧╙ MACHINE, YOU WILL PROBABLY HAVE TO USE THE ╥┼╬┴═┼ COMMAND TO
RENAME THE FIRST VERSIONS OF THE FILE ON THE DISK TO SOMETHING ELSE SO ═╙-─╧╙
WILL SCAN FURTHER IN THE DIRECTORY FOR THE LAST VERSION OF THE FILE WITH THE
SAME FILENAME. ╘HERE IS NO RENAME COMMAND IN ╠╥╥ BECAUSE ╔ NEVER THOUGHT OF
IT IN TIME. ╔T WOULD HAVE BEEN FAIRLY EASY TO PUT IN.
╘HE DATE GENERATED FOR A NEW ═╙-─╧╙ FILE WILL BE ALL ZEROS. ╙OME SYSTEMS
INTERPRET THIS AS 12:00 AM, 01-╩AN-80 AND OTHERS DON'T DISPLAY A DATE AT ALL
FOR THIS VALUE.
╘HE PHYSICAL COPYING OF THE FILE IS DONE COMPLETELY IN MACHINE LANGUAGE AND
NOTHING IS DISPLAYED ON THE SCREEN WHILE THIS IS HAPPENING, BUT YOU CAN FOLLOW
THINGS BY LOOKING AT THE BLINKING LIGHTS AND LISTENING FOR CLICKS AND GRINDS.
╙INCE THE ╞┴╘ AND DIRECTORY ARE MAINTAINED IN ╥┴═ DURING THE ENTIRE COPYING
PROCESS AND ARE ONLY FLUSHED TO DISK AFTER THE ENTIRE BATCH OF FILES ARE
COPIED, COPYING IS MADE MORE EFFICIENT, SINCE THERE WILL BE NO COSTLY SEEK
BACK TO TRACK 0 AFTER WRITING EACH FILE (LIKE ═╙-─╧╙ DOES). ╔F YOU HAVE A
NUMBER OF SMALL FILES TO COPY, THEN THEY WILL BE KNOCKED OFF IN QUICK
SUCCESSION, FASTER THAN MANY ═╙-─╧╙ MACHINES WILL COPY THEM.
╘O SIMPLIFY THE IMPLEMENTATION, THE CURRENT TRACK OF DISK BLOCKS FOR WRITING
IS NOT MAINTAINED LIKE IT IS FOR READING. ┴LSO, A WRITING INTERLEAVE OF 1:1
IS USED FOR A 1571, WHICH IS NOT OPTIMAL. ╚OWEVER, SINCE WRITING IS SUCH A
SLOW OPERATION ANYWAY, AND SINCE THE 1571 IS PARTICULARLY BAD BY INSISTING ON
VERIFYING BLOCKS, NOT MUCH MORE OVERHEAD IS INTRODUCED THAN IS ALREADY
PRESENT.
┴N INTERESTING NOTE ABOUT WRITING ═╙-─╧╙ DISKS IS THAT YOU CAN TERMINATE ╠╥╥
IN THE MIDDLE OF A COPY (WITH ╙╘╧╨+╥┼╙╘╧╥┼) OR IN THE MIDDLE OF COPYING A
BATCH OF FILES, AND THE ═╙-─╧╙ DISK WILL REMAIN IN A PERFECTLY CONSISTENT
STATE AFTERWARDS. ╘HE STATE WILL BE AS IF NONE OF THE FILES WERE COPIED. ╘HE
REASON IS THAT THE CONTROL INFORMATION (THE ╞┴╘ AND DIRECTORY) IS MAINTAINED
INTERNALLY AND IS FLUSHED ONLY AFTER COPYING IS ALL COMPLETED. ┬UT DON'T
TERMINATE ╠╥╥ WHILE IT IS FLUSHING THE CONTROL INFORMATION.
╚ERE IS A TABLE OF COPYING SPEEDS FOR COPYING TO 1571, 1581, AND ├═─ ╞─-4000
DISK UNITS WITH ┴╙├ AND ┬╔╬ TRANSLATION MODES. ┴LL FIGURES ARE IN BYTES/
SECOND, WHICH INCLUDES BOTH READING THE BYTE FROM A ├= DISK AND WRITING IT TO
THE ═╙-─╧╙ DISK. ╘HE AVERAGE SPEED FOR EITHER THE READ OR WRITE OPERATION
INDIVIDUALLY WILL BE TWICE THE SPEED GIVEN BELOW. ╘HESE RESULTS WERE OBTAINED
FROM COPYING A 156,273 BYTE TEXT FILE (THE TEXT OF ├= ╚ACKING ╔SSUE #4).
╞╥╧═ \ ╘╧: ╞─-BIN ╞─-ASC 81-BIN 81-ASC 71-BIN 71-ASC
--------+ ------ ------ ------ ------ ------ ------
╥┴═╠INK ▄ 2,332 2,200 2,332 2,200 1,594 1,559
╥┴═─╧╙ ▄ 1,070 1,053 1,604 1,600 1,561 1,510
╞─4000 ▄ - - 1,645 1,597 1,499 1,464
╩─1581 ▄ 1,662 1,619 - - 1,474 1,440
╩─1571 ▄ 1,050 1,024 953 933 - -
╘HESE FIGURES ARE FOR TRANSFER SPEED ONLY, NOT COUNTING THE COUPLE OF SECONDS
OF OPENING FILES AND FLUSHING THE DIRECTORY. ╬OTE THAT ALL MY PHYSICAL DRIVES
ARE ╩IFFY─╧╙-IFIED, SO YOUR PERFORMANCE MAY BE SLOWER. ╔ AM AT A LOSS TO
EXPLAIN WHY AN ╞─-4000 IS SO MUCH SLOWER THAN A 1581 FOR COPYING FROM A
╥┴═─╧╙ FILE, BUT THE SAME SPEED OR BETTER FOR COPYING FROM ANYTHING ELSE.
---------------------------------------------------------┼ND-OF--╠╥╥200.─╧├---